﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml;
using JSONTest;


public partial class test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        string query = Request.QueryString["q"];
        if (string.IsNullOrEmpty(query))
            query = "";

        Results liveResults =  Results.Search(query);
        Response.Clear();
        JSON.JSONCollection jsonObj = liveResults.WriteObject();
        jsonObj.OmitName = true;
        Response.Write(jsonObj.Print());
        Response.End();
    }
}
